﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using Com.AAS.Common.Utils;
using Com.AAS.Toolbox.DataMirror.Config;
using Com.AAS.Toolbox.DataMirror.GUI;
using Com.AAS.Toolbox.DataMirror.Server;
using Com.AAS.Toolbox.DataMirror.Setting;
using Com.AAS.Common;
using Newtonsoft.Json;

namespace Com.AAS.Toolbox.DataMirror
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // 加载配置文件
            FileSystemConfig cfg = JsonConvert.DeserializeObject<FileSystemConfig>(
                File.ReadAllText(@"./control/config.json"));

            // 启动监控进程
            FileSystemCoreServer server = new FileSystemCoreServer(cfg);
            
            // 状态栏图标
            Icon icon = new Icon(@".\\logo.ico"); // 主界面图标            
            NotifyIconForm notifyForm = new NotifyIconForm("Brid", icon, null);
            Application.Run(notifyForm);

        }
    }
}
